package net.myjung.hibernate;

import java.util.ArrayList;
import java.util.List;

import net.myjung.model.BaseObject;
import net.myjung.model.annotation.MdlAttribute;
import net.myjung.model.annotation.MdlClass;
import net.myjung.model.annotation.MdlElement;

@MdlClass(name = "Hibernate-mapping", dtd = "hibernate-mapping PUBLIC \"-//Hibernate/Hibernate Mapping DTD 3.0//EN\" \"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd\"")
@SuppressWarnings("serial")
public class HbnHibernate_mapping extends BaseObject {
	@MdlAttribute(name = "package", type = "string")
	private String pkg;
	@MdlAttribute(name = "default-lazy", type = "boolean")
	private Boolean default_lazy;
	@MdlElement(name = "class", type = "net.myjung.hibernate.Class")
	private List<HbnClass> clazz;

	public String getPackage() {
		return pkg;
	}
	public void setPackage(String pkg) {
		this.pkg = pkg;
	}
	public Boolean getDefault_lazy() {
		return default_lazy;
	}
	public void setDefault_lazy(Boolean default_lazy) {
		this.default_lazy = default_lazy;
	}
	public List<HbnClass> getClazz() {
		return clazz;
	}
	public void setClazz(List<HbnClass> clazz) {
		this.clazz = clazz;
	}
	public void addClazz(HbnClass clazz) {
		if (this.clazz == null)
			this.clazz = new ArrayList<HbnClass>();
		this.clazz.add(clazz);
	}
	public void removeClazz(HbnClass clazz) {
		if (this.clazz == null || !this.clazz.contains(clazz))
			return;
		this.clazz.remove(clazz);
	}
}